import request from '@/utils/request'

// 查询档案资料上传列表
export function listCertificateinfo(query) {
  return request({
    url: '/result/certificateinfo/list',
    method: 'get',
    params: query
  })
}

// 查询档案资料上传详细
export function getCertificateinfo(id) {
  return request({
    url: '/result/certificateinfo/' + id,
    method: 'get'
  })
}
/**
 * 根据多个id批量查询档案资料上传详细
 */
export function getCertificateinfoByIds(ids) {
  return request({
    url: `/result/certificateinfo/getCertificateinfoByIds`,
    method: 'get',
    params: { ids: ids.join(',') } // 将数组转换为逗号分隔的字符串
  });
}
// 新增档案资料上传
export function addCertificateinfo(data) {
  return request({
    url: '/result/certificateinfo',
    method: 'post',
    data: data
  })
}

// 修改档案资料上传
export function updateCertificateinfo(data) {
  return request({
    url: '/result/certificateinfo',
    method: 'put',
    data: data
  })
}

// 删除档案资料上传
export function delCertificateinfo(id) {
  return request({
    url: '/result/certificateinfo/' + id,
    method: 'delete'
  })
}
/**
 * 批量导出档案资料上传
 */
export function exportCertificateinfo(params) {
  return request.post(`/result/certificateinfo/export/certificateinfo`, params, {
    responseType: 'blob'
  });
}
